package com.jlcloud.core.log.exception;

import com.jlcloud.core.tool.api.IResultCode;
import com.jlcloud.core.tool.api.ResultCode;
import org.springframework.util.StringUtils;

/**
 * <p>参数校验失败异常</p>
 *
 * @author By: zhangchunyang
 * Package com.jlcloud.core.log.exception
 * Ceate Time 2023-04-27 09:40
 * Copyright 2021 www.jilianjituan.com Inc. All rights reserved.
 * 注意：本内容仅限于冀联人力集团内部传阅，禁止外泄以及用于其他的商业目的
 */
public class ParamValidException extends ServiceException {

	private static final long serialVersionUID = 1L;

	public ParamValidException() {
		super(ResultCode.PARAM_VALID_ERROR);
	}

	public ParamValidException(String message) {
		super(ResultCode.PARAM_VALID_ERROR, message);
	}

	public ParamValidException(String message, Throwable cause) {
		super(ResultCode.PARAM_VALID_ERROR, message, cause);

	}

	public ParamValidException(IResultCode resultCode) {
		super(resultCode);
	}

	public ParamValidException(IResultCode resultCode, Throwable cause) {
		super(resultCode, cause);
	}

	public ParamValidException(IResultCode resultCode, String message) {
		super(resultCode, StringUtils.isEmpty(message) ? resultCode.getMessage() : message);
	}

	public ParamValidException(IResultCode resultCode, String message, Throwable cause) {
		super(resultCode, message, cause);
	}
}
